﻿<?php 
    foreach ($tags as $tag) {        
        $list_tags[$tag['tags']['id']] =$tag['tags']['name'];
        };   
?>
<div class="communities form">
	<?php echo $this->Form->create('Community'); ?>
	<fieldset>
		<?php
			echo $this->Form->input('id', array('type' => 'hidden'));
			echo $this->Form->input('description',array('label'=>'Descrição da comunidade','class'=>'form-control','div'=>array('form-group')));
            echo $this->Form->input('private');
			echo $this->Form->input('Tag.name', array('options' => $list_tags, 'type'=>'select', 'empty' => 'Selecione um tag', 'label' => 'Tag: ')); 
			echo $this->Form->input('photo',array('type'=>'file','label'=>'Foto capa da comunidade','class'=>'form-control','div'=>array('form-group')));
		?>
	</fieldset>
	<br>
	<?php echo $this->Form->end(array('label'=>'Salvar','class'=>'btn btn-primary')); ?>
</div>
